package com.zego.wawaji.third.pay.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.zego.wawaji.base.data.BaseData;

import org.json.JSONObject;

/**
 * 获取阿里支付订单
 * Created by Su on 2017/12/2.
 */
public class Alipay extends BaseData implements Parcelable{
    private String url;

    @Override
    public void parseJson(String jsonStr) {
        JSONObject jsonObject = getJsonObject(jsonStr);
        this.setUrl(jsonObject.optString("Url"));
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.url);
    }

    public Alipay() {
    }

    protected Alipay(Parcel in) {
        this.url = in.readString();
    }

    public static final Creator<Alipay> CREATOR = new Creator<Alipay>() {
        @Override
        public Alipay createFromParcel(Parcel source) {
            return new Alipay(source);
        }

        @Override
        public Alipay[] newArray(int size) {
            return new Alipay[size];
        }
    };
}
